<template>
  <!--项目实施-具体人员任务列表组件 -->
  <div class="table">
    <a-table :columns="columns" :dataSource="tableData" bordered>
      <span slot="result" slot-scope="text" class="green">
        {{text}}
      </span>
      <span slot="date" class="actionButton" @click="show">
        <a-button type="primary" class="buttonColorGreen ml10 mr10">签到打卡</a-button>
      </span>
      <span slot="operation">
        <router-link to="/checkinAdd" class="actionButton">
          <a-icon type="check-circle" />修改</router-link>
        <a-divider type="vertical" />
        <span class="actionButton">
          <a-icon type="close" />删除</span>
      </span>
    </a-table>
  </div>
</template>

<script>
const columns = [{   //表格表头
  title: '序号',
  dataIndex: 'number',
  scopedSlots: { customRender: 'number' },
},
{
  title: '项目名称',
  dataIndex: 'name',
},
{
  title: '任务编号',
  dataIndex: 'objectNum',
},
{
  title: '事项',
  className: 'objectName',
  dataIndex: 'objectName',
},
{
  title: '具体内容',
  dataIndex: 'checkinTime',
},
{
  title: '具体内容时间节点安排',
  dataIndex: 'time',
},
{
  title: '具体内容节点安排',
  dataIndex: 'content',
},
{
  title: '参与人员',
  dataIndex: 'objectType',
},
{
  title: '进度',
  dataIndex: 'price',
},
{
  title: '本周花费时间',
  dataIndex: 'allPrice',
},
{
  title: '累计时间',
  dataIndex: 'ss',
},
{
  title: '操作',
  scopedSlots: { customRender: 'date' },
},
{
  title: '是否检查成果',
  dataIndex: 'result',
  scopedSlots: { customRender: 'result' },
},
{
  title: '操作',
  // dataIndex: 'operation',
  scopedSlots: { customRender: 'operation' },
}
];

export default {
  props: {
    tableData: {
      type: Array
    },
    DateShow:{
      type: Boolean
    }
  },
  data() {
    return {
      columns,
    }
  },
  methods:{
    show(){
      this.$emit("update:DateShow",true)
    }
  }
}
</script>

<style scoped>
.green {
  color: #1abc9c;
}
</style>
